<!--#include("./newsletter_header.html")-->

<h4 class="xeAdmin">{$lang->cmd_list_setting}</h4>
<p class="summary">{$lang->about_list_config}</p>

<form class="form" method="post" enctype="multipart/form-data"> 
    <input type="hidden" name="module" value="newsletter" />
    <input type="hidden" name="act" id="act" value="procNewsletterAdminInsert" />
    <input type="hidden" name="newsletter_lists" id="newsletter_lists" value="" />
    <!--@if(!isset($news_srl) || $news_srl == null)-->
        <input type="hidden" name="news_srl" id="news_srl" value="" />
    <!--@end-->
    <!--@if(isset($news_srl))-->
        <input type="hidden" name="news_srl" id="news_srl" value="{$news_srl}" />
    <!--@end-->
    <table cellspan="3" cellpaddin="0" border="0" class="nowrap_underline" style="margin-left:30px;">
        <tr>
            <td width="200">{$lang->title}</td>
            <td colspan="2">
                <!--@if( isset($title) )-->
                    <input type="text" name="newsletter_title" id="newsletter_title" class="items" value="{$title}" />
                <!--@end-->
                <!--@if( !isset($title) )-->
                    <input type="text" name="newsletter_title" id="newsletter_title" class="items" value="" />
                <!--@end-->
            </td>
        </tr>
        <tr>
            <td width="200">{$lang->content}</td>
            <td colspan="2">
                <textarea name="newsletter_content" id="newsletter_content" class="items" rows="10"><!--@if( isset($content) )-->{$content}<!--@end--></textarea>
            </td>
        </tr>
        <tr>
            <td width="200">{$lang->file_attach}</td>
            <td colspan="2">
                <input type="file" name="newsletter_attach" id="newsletter_attach" class="items" onchange="validateFileUpload(this)" />
            </td>
        </tr>
        <tr>
            <td>Select members for TO:</td>
            <td>Select members for CC:</td>
            <td>Select members for BCC:</td>
        </tr>
        <tr>
            <td><input checked="checked" type="radio" value="SelTo" name="selMembersForNewsletter" /></td>
            <td><input type="radio" value="SelCc" name="selMembersForNewsletter" /></td>
            <td><input type="radio" value="SelBcc" name="selMembersForNewsletter" /></td>
        </tr>
    </table>

    <div class="targetItem">
        <strong>{$lang->list_target_item}</strong>
        <select size="10" name="targetItem" id="targetItem" ondblclick="doInsertItem(); return false;">
        <!--@foreach($extra_vars as $key => $val)-->
        <option value="{$key}">{$val}</option>
        <!--@end-->
        </select>
    </div>

    <div class="displayButton">
        <a href="#" onclick="doInsertItem(); return false;" class="buttonSet buttonRight"><span>{$lang->cmd_insert}</span></a><br />
        <a href="#" onclick="doDeleteItem(); return false;" class="buttonSet buttonLeft"><span>{$lang->cmd_delete}</span></a><br />
        <a href="#" onclick="doMoveUpItem(); return false;" class="buttonSet buttonUp"><span>{$lang->cmd_move_up}</span></a><br />
        <a href="#" onclick="doMoveDownItem(); return false;" class="buttonSet buttonDown"><span>{$lang->cmd_move_down}</span></a>
    </div>

    <div id="divSelTo" class="displayItem">
        <strong>{$lang->list_to_item}</strong>
        <select size="10" name="membersSelTo" id="membersSelTo" ondblclick="doDeleteItem();">
        <!--@foreach($list_config_to as $key => $val)-->
        <option value="{$key}">{$val}</option>
        <!--@end-->
        </select>
    </div>

    <div id="divSelCc" class="displayItem hidden">
        <strong>{$lang->list_cc_item}</strong>
        <select size="10" name="membersSelCc" id="membersSelCc" ondblclick="doDeleteItem();">
        <!--@foreach($list_config_cc as $key => $val)-->
        <option value="{$key}">{$val}</option>
        <!--@end-->
        </select>
    </div>

    <div id="divSelBcc" class="displayItem hidden">
        <strong>{$lang->list_bcc_item}</strong>
        <select size="10" name="membersSelBcc" id="membersSelBcc" ondblclick="doDeleteItem();">
        <!--@foreach($list_config_bcc as $key => $val)-->
        <option value="{$key}">{$val}</option>
        <!--@end-->
        </select>
    </div>

    <div class="fr" style="padding-top: 10px;clear:left; text-align: center; width: 600px;">
        <!--@if(!isset($news_srl) || $news_srl==null)-->
        <span class="button black strong"><button onclick="doSaveListConfig();return false;" type="button">{$lang->cmd_save}</button></span>
        <span class="button black strong"><button onclick="doSaveAndSendListConfig();return false;" type="button">{$lang->cmd_save_and_send}</button></span>
        <!--@end-->
        <!--@if(isset($news_srl) && $news_srl!=null)-->
        <span class="button black strong"><button onclick="doUpdateListConfig();return false;" type="button">{$lang->cmd_update}</button></span>
        <span class="button black strong"><button onclick="doUpdateAndSendListConfig();return false;" type="button">{$lang->cmd_update_and_send}</button></span>
        <!--@end-->
    </div>

</form>
